<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>CompoundUndoManager</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="CompoundUndoManager";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../mmj/pa/CommentStmt.html" title="class in mmj.pa"><span class="strong">Prev Class</span></a></li>
<li><a href="../../mmj/pa/DerivationStep.html" title="class in mmj.pa"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?mmj/pa/CompoundUndoManager.html" target="_top">Frames</a></li>
<li><a href="CompoundUndoManager.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_javax.swing.undo.CompoundEdit">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">mmj.pa</div>
<h2 title="Class CompoundUndoManager" class="title">Class CompoundUndoManager</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>javax.swing.undo.AbstractUndoableEdit</li>
<li>
<ul class="inheritance">
<li>javax.swing.undo.CompoundEdit</li>
<li>
<ul class="inheritance">
<li>javax.swing.undo.UndoManager</li>
<li>
<ul class="inheritance">
<li>mmj.pa.CompoundUndoManager</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, java.util.EventListener, javax.swing.event.DocumentListener, javax.swing.event.UndoableEditListener, javax.swing.undo.UndoableEdit</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">CompoundUndoManager</span>
extends javax.swing.undo.UndoManager
implements javax.swing.event.UndoableEditListener, javax.swing.event.DocumentListener</pre>
<div class="block">This class will merge individual edits into a single larger edit. That is,
 characters entered sequentially will be grouped together and undone as a
 group. Any attribute changes will be considered as part of the group and will
 therefore be undone when the group is undone.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../serialized-form.html#mmj.pa.CompoundUndoManager">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_javax.swing.undo.CompoundEdit">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;javax.swing.undo.CompoundEdit</h3>
<code>edits</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_javax.swing.undo.AbstractUndoableEdit">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;javax.swing.undo.AbstractUndoableEdit</h3>
<code>RedoName, UndoName</code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#CompoundUndoManager(javax.swing.text.JTextComponent, java.lang.Runnable)">CompoundUndoManager</a></strong>(javax.swing.text.JTextComponent&nbsp;textComponent,
                   java.lang.Runnable&nbsp;updateCallback)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#changedUpdate(javax.swing.event.DocumentEvent)">changedUpdate</a></strong>(javax.swing.event.DocumentEvent&nbsp;e)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#discardAllEdits()">discardAllEdits</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#insertUpdate(javax.swing.event.DocumentEvent)">insertUpdate</a></strong>(javax.swing.event.DocumentEvent&nbsp;e)</code>
<div class="block">Updates to the Document as a result of Undo/Redo will cause the Caret to
 be repositioned</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#redo()">redo</a></strong>()</code>
<div class="block">Add a DocumentLister before the redo is done so we can position the Caret
 correctly as each edit is redone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#removeUpdate(javax.swing.event.DocumentEvent)">removeUpdate</a></strong>(javax.swing.event.DocumentEvent&nbsp;e)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#undo()">undo</a></strong>()</code>
<div class="block">Add a DocumentLister before the undo is done so we can position the Caret
 correctly as each edit is undone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#undoableEditHappened(javax.swing.event.UndoableEditEvent)">undoableEditHappened</a></strong>(javax.swing.event.UndoableEditEvent&nbsp;e)</code>
<div class="block">Whenever an UndoableEdit happens the edit will either be absorbed by the
 current compound edit or a new compound edit will be started</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/pa/CompoundUndoManager.html#updateCursorPosition()">updateCursorPosition</a></strong>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_javax.swing.undo.UndoManager">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;javax.swing.undo.UndoManager</h3>
<code>addEdit, canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoOrRedo, undoTo</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_javax.swing.undo.CompoundEdit">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;javax.swing.undo.CompoundEdit</h3>
<code>die, getPresentationName, isInProgress, isSignificant, lastEdit</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_javax.swing.undo.AbstractUndoableEdit">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;javax.swing.undo.AbstractUndoableEdit</h3>
<code>replaceEdit</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="CompoundUndoManager(javax.swing.text.JTextComponent, java.lang.Runnable)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CompoundUndoManager</h4>
<pre>public&nbsp;CompoundUndoManager(javax.swing.text.JTextComponent&nbsp;textComponent,
                   java.lang.Runnable&nbsp;updateCallback)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="undo()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>undo</h4>
<pre>public&nbsp;void&nbsp;undo()</pre>
<div class="block">Add a DocumentLister before the undo is done so we can position the Caret
 correctly as each edit is undone.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>undo</code>&nbsp;in interface&nbsp;<code>javax.swing.undo.UndoableEdit</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code>undo</code>&nbsp;in class&nbsp;<code>javax.swing.undo.UndoManager</code></dd>
</dl>
</li>
</ul>
<a name="redo()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>redo</h4>
<pre>public&nbsp;void&nbsp;redo()</pre>
<div class="block">Add a DocumentLister before the redo is done so we can position the Caret
 correctly as each edit is redone.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>redo</code>&nbsp;in interface&nbsp;<code>javax.swing.undo.UndoableEdit</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code>redo</code>&nbsp;in class&nbsp;<code>javax.swing.undo.UndoManager</code></dd>
</dl>
</li>
</ul>
<a name="discardAllEdits()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>discardAllEdits</h4>
<pre>public&nbsp;void&nbsp;discardAllEdits()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>discardAllEdits</code>&nbsp;in class&nbsp;<code>javax.swing.undo.UndoManager</code></dd>
</dl>
</li>
</ul>
<a name="updateCursorPosition()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>updateCursorPosition</h4>
<pre>public&nbsp;void&nbsp;updateCursorPosition()</pre>
</li>
</ul>
<a name="undoableEditHappened(javax.swing.event.UndoableEditEvent)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>undoableEditHappened</h4>
<pre>public&nbsp;void&nbsp;undoableEditHappened(javax.swing.event.UndoableEditEvent&nbsp;e)</pre>
<div class="block">Whenever an UndoableEdit happens the edit will either be absorbed by the
 current compound edit or a new compound edit will be started</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>undoableEditHappened</code>&nbsp;in interface&nbsp;<code>javax.swing.event.UndoableEditListener</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code>undoableEditHappened</code>&nbsp;in class&nbsp;<code>javax.swing.undo.UndoManager</code></dd>
</dl>
</li>
</ul>
<a name="insertUpdate(javax.swing.event.DocumentEvent)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>insertUpdate</h4>
<pre>public&nbsp;void&nbsp;insertUpdate(javax.swing.event.DocumentEvent&nbsp;e)</pre>
<div class="block">Updates to the Document as a result of Undo/Redo will cause the Caret to
 be repositioned</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>insertUpdate</code>&nbsp;in interface&nbsp;<code>javax.swing.event.DocumentListener</code></dd>
</dl>
</li>
</ul>
<a name="removeUpdate(javax.swing.event.DocumentEvent)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeUpdate</h4>
<pre>public&nbsp;void&nbsp;removeUpdate(javax.swing.event.DocumentEvent&nbsp;e)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>removeUpdate</code>&nbsp;in interface&nbsp;<code>javax.swing.event.DocumentListener</code></dd>
</dl>
</li>
</ul>
<a name="changedUpdate(javax.swing.event.DocumentEvent)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>changedUpdate</h4>
<pre>public&nbsp;void&nbsp;changedUpdate(javax.swing.event.DocumentEvent&nbsp;e)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>changedUpdate</code>&nbsp;in interface&nbsp;<code>javax.swing.event.DocumentListener</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../mmj/pa/CommentStmt.html" title="class in mmj.pa"><span class="strong">Prev Class</span></a></li>
<li><a href="../../mmj/pa/DerivationStep.html" title="class in mmj.pa"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?mmj/pa/CompoundUndoManager.html" target="_top">Frames</a></li>
<li><a href="CompoundUndoManager.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_javax.swing.undo.CompoundEdit">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
